﻿using System;
using System.Web.Mvc;

namespace cludg.Web.Core.RenderHelpers
{
	public static class DateTimeRenderHelper
	{
		public const string DatetTimeFormat = "dd.MM.yyyy HH:mm";

		public static MvcHtmlString RenderDateTime(this HtmlHelper html, DateTime? dateTime)
		{
			return MvcHtmlString.Create(dateTime.HasValue ? dateTime.Value.ToString(DatetTimeFormat) : "<без даты>");
		}
	}
}
